<template>
    <div>
        <el-carousel :interval="4000" type="card" height="400px">
            <el-carousel-item v-for="(item,index) in imgs" :key="index">
                <el-image :src="item.img" fit="contain"></el-image>
            </el-carousel-item>
        </el-carousel>
    </div>
</template>
<script>
export default {
    name: 'Home',
    data() {
        return {
            imgs: [
                { img: require('../assets/homeImg/a.png') },
                { img: require('../assets/homeImg/b.jpg') },
                { img: require('../assets/homeImg/c.jpg') },
                { img: require('../assets/homeImg/d.jpg') },
                { img: require('../assets/homeImg/e.jpg') },
                { img: require('../assets/homeImg/f.jpg') },
                { img: require('../assets/homeImg/g.jpg') },
                { img: require('../assets/homeImg/h.jpg') },
                { img: require('../assets/homeImg/j.png') },
            ]
        }
    }
}  
</script>
<style>
.el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 200px;
    margin: 0;
}

.el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
}
</style>